import $http from './request.js'

// 
export function getProductListCv(query) {
  return $http.get('/product/product/list?types=1&types=3')
}
// 下单查询车辆列表
export function orderGetCarList(query) {
  return $http.get('/vehicle/portal/vehicle/searchV4', query)
}

// 车企搜索上架的车辆
export function publishVehicleList(query) {
  return $http.get('/vehicle/company/search/publish/vehicle/', query)
}

// 判断下单车辆逻辑
export function bindJudgmentVehicle(data) {
  return $http.get('/vehicle/vehicle/bindJudgment', data)
}

// 选择司机判断逻辑
export function bindJudgment(query) {
  return $http.get('/vehicle/driver/bindJudgment', query)
}

// 关联驾驶员
export function bindDriver(data) {
  return $http.post('/vehicle/auto/bindDriver', data, {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

// 获取车企转单车辆列表
export function transferAutoList(data) {
  return $http.get('/vehicle/transferAutoList', data)
}

// 车态分页
export function vehicleStatusSearch(data) {
  return $http.get('/vehicle/portal/vehicle/status/searchV3', data)
}

// 查询产品定价记录列表
export function getProductPriceList(data) {
  return $http.get('/product/price/byProduct', data)
}

// 车辆上架、下架, 返回车辆上架状态boolean
export function publishCar(data) {
  return $http.post('/vehicle/auto/publish', data)
}

// 删除车辆
export function deleteCar(id, data) {
  return $http.post('/vehicle/auto/delete/' + id, data)
}

// 获取产品列表
export function getProductList(data) {
  return $http.get('/product/product/list/all', data, {
    noCheck: true
  })
}

// 定价查询车型定价记录列表
export function getCarTypePriceList(data) {
  return $http.get('/product/price/byType', data)
}

// 分页获取车企全部车型
export function pageVehicleType(data) {
  return $http.get('/vehicle/portal/vehicle/type/page', data)
}
// 顺风车分配司机
export function assignOrderToVehicle(query) {
	return $http.post('/order/carpoolOrder/assignOrderToVehicle', query , {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

//车企搜索审核通的司机
export function publishDriver(data) {
  return $http.get('/vehicle/company/search/publish/driver', data)
}
